/*=============== 谷歌字体 ===============*/
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500&family=Poppins:wght@400;500&display=swap");

/*=============== css变量 ===============*/
:root {
  --header-height: 3.5rem;

  /*========== 颜色 ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(260, 100%, 66%);
  --second-color: hsl(328, 100%, 66%);
  --gradient-color: linear-gradient(75deg,
      var(--second-color) 12%,
      var(--first-color) 90%);
  --first-color-light: hsl(260, 88%, 92%);
  --first-color-dark: hsl(260, 80%, 16%);
  --title-color: hsl(260, 80%, 18%);
  --text-color: hsl(260, 24%, 32%);
  --text-color-light: hsl(260, 16%, 65%);
  --white-color: hsl(0, 0%, 100%);
  --body-color: hsl(260, 100%, 97%);
  --container-color: hsl(0, 0%, 100%);

  /*========== 字体和排版 ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --second-font: "Lora", serif;
  --biggest-font-size: 2.75rem;
  --bigger-font-size: 2rem;
  --big-font-size: 1.75rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== 响应式排版 ==========*/
@media screen and (min-width: 1152px) {
  :root {
    --biggest-font-size: 6rem;
    --bigger-font-size: 4rem;
    --big-font-size: 3.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== 基础css ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background .4s;
  /* for dark mode animation*/
}

h1,
h2,
h3,
h4 {
  color: var(--title-color);
  font-weight: var(--font-regular);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== 主题 ===============*/
.nav-buttons {
  display: flex;
  align-items: center;
  column-gap: 1.25rem;
}


.change-theme {
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --title-color: hsl(260, 64%, 85%);
  --text-color: hsl(260, 20%, 65%);
  --body-color: hsl(260, 64%, 10%);
  --container-color: hsl(260, 32%, 24%);
}

/*========== 
	Color changes in some parts of 
	the website, in dark theme
==========*/
.dark-theme .blur-header::after,
.dark-theme .nav-menu {
  background-color: hsla(0, 0%, 10%, .3);
}

.dark-theme .list-blob {
  background-color: var(--container-color);
}

.dark-theme :is(.follow-content-1, .follow-content-2) img {
  border: 5px solid var(--container-color);
}

.dark-theme .join-input {
  color: hsl(260, 80%, 18%);
}

.dark-theme .footer {
  background-color: var(--body-color);
}


.dark-theme::-webkit-scrollbar {
  background-color: hsl(260, 32%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb {
  background-color: hsl(260, 16%, 25%);
}

.dark-theme::-webkit-scrollbar-thumb:hover {
  background-color: hsl(260, 16%, 35%);
}



/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}

.section-title {
  text-align: center;
  font-size: var(--bigger-font-size);
  font-family: var(--second-font);
  margin-bottom: 1.5rem;
}

.main {
  overflow: hidden;
  /* For animation ScrollReveal */
}




/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  background-color: var(--body-color);
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: background .4s;
  /* for dark mode animation*/
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: var(--h2-font-size);
  font-family: var(--second-font);
  font-weight: var(--font-medium);
  background: var(--gradient-color);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


.nav-toggle,
.nav-close {
  display: flex;
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}





/* Navigation for mobile devices */
@media screen and (max-width: 767px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: hsla(0, 0%, 100%, .3);
    width: 75%;
    height: 100%;
    padding: 4.5rem 0 0 3rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    /* for safari*/
    transition: right .4s;
  }
}

.nav-list {
  display: flex;
  flex-direction: column;
  row-gap: 3rem;
}

.nav-link {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

.nav-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu {
  right: 0;
}

/* Add blur to header */
.blur-header {
  background-color: transparent;
}

.blur-header::after {
  content: '';
  position: absolute;
  width: 1000%;
  height: 100%;
  background-color: hsla(0, 0%, 100%, .3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* For safari */
  top: 0;
  left: 0;
  z-index: -1;
}

/* Active link */
.active-link {
  background: var(--gradient-color);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}





/*=============== HOME ===============*/
.home-container {
  row-gap: 2rem;
  padding-top: 1rem;
}

.home-data {
  text-align: center;
}

.home-title {
  font-size: var(--bigger-font-size);
  font-family: var(--second-font);
  font-weight: var(--font-medium);
  line-height: 135%;
  position: relative;
  width: max-content;
  margin: 0 auto 1.25rem;
}

.home-title-box {
  display: flex;
  justify-content: center;
  column-gap: .75rem;
}


.home-title-box div {
  background: var(--gradient-color);
  padding: .25rem .75rem;
  border-radius: .5rem;
  color: var(--white-color);
  transform: rotate(10deg);
}

.home-title img {
  position: absolute;
  width: 50px;
  left: -1rem;
  bottom: 1rem;
}

.home-description {
  position: relative;
  margin-bottom: 1.5rem;
}

.home-description img {
  position: absolute;
  width: 16px;
  right: 4rem;
  bottom: -1rem;
}

.home-box {
  display: flex;
  justify-content: center;
  column-gap: 3rem;
  margin-top: 2rem;
}

.home-box h3 {
  font-size: var(--big-font-size);
  font-family: var(--second-font);
}

.home-box span {
  font-size: var(--small-font-size);
}

.home-img {
  width: 320px;
  justify-self: center;
}







/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  background: var(--gradient-color);
  padding: 1rem 1.8rem;
  border-radius: 4rem;
  color: var(--white-color);
  font-weight: var(--font-medium);
}

.button i {
  font-size: 1.5rem;
  transition: transform .3s;
}


.button:hover i {
  transform: translateX(.25rem);
}







/*=============== LIST ===============*/
.list-container {
  row-gap: 3rem;
}

.list-content,
.list-blob {
  display: flex;
}

.list-content {
  justify-content: center;
  align-items: center;
  column-gap: 1.5rem;
}


.list-number {
  font-size: var(--big-font-size);
  font-family: var(--second-font);
  font-weight: var(--font-medium);
}

.list-blob {
  background-color: var(--first-color-light);
  width: 230px;
  height: 100px;
  border-radius: 12.5rem;
  align-items: center;
  justify-content: center;
  transition: background .4s;
  /* for dark mode animation*/
}

.list-blob img {
  width: 180px;
  transform: translateY(-1rem);
}

.list-data {
  text-align: center;
  display: grid;
  justify-items: center;
  row-gap: 5rem;
}

.list-description {
  position: relative;
}

.list-description img {
  position: absolute;
  width: 50px;
  top: -1.8rem;
  left: 0;
}

.list-button {
  position: relative;
  padding: 0;
}


.list-button,
.list-button i {
  background: var(--gradient-color);
          background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.list-button img {
  position: absolute;
  max-width: initial;
  width: 150px;
  left: -2.8rem;
}






/*=============== HEALTH ===============*/
.health-container {
  row-gap: 2rem;
}

.health-data {
  text-align: center;
}

.health-description {
  margin-bottom: 2rem;
}

.health-image {
  position: relative;
  justify-self: center;
}

.health-img {
  width: 320px;
}

.health-rate,
.health-course {
  background-color: var(--container-color);
  padding: .5rem .75rem;
  border-radius: .75rem;
  width: max-content;
  display: flex;
  align-items: center;
  column-gap: .5rem;
  position: absolute;
  transition: background .4s;
  /* for dark mode animation*/
}

.health-icon {
  background-color: hsl(2, 100%, 95%);
  border-radius: 50%;
  display: flex;
  padding: 6px;
  font-size: 1.5rem;
  color: hsl(2, 100%, 58%);
}

.health-title,
.health-number {
  display: block;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

.health-title {
  color: var(--title-color);
}

.health-number {
  background: var(--gradient-color);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}


.health-rate {
  top: 4.5rem;
  left: .5rem;
}

.health-course {
  right: .5rem;
  bottom: 2rem;
}






/*=============== ROUTINE ===============*/
.routine-container {
  row-gap: 2rem;
}

.routine-data {
  text-align: center;
}

.routine-description {
  margin-bottom: 2rem;
}

.routine-images {
  position: relative;
  width: 300px;
  height: 280px;
  justify-self: center;
}

.routine-img-1,
.routine-img-2 {
  width: 250px;
  border-radius: 12.5rem;
  position: absolute;
}

.routine-img-1 {
  border: 5px solid var(--body-color);
  top: 0;
  left: 0;
  z-index: 1;
  transition: border .4s;
  /* for dark mode animation*/
}

.routine-img-2 {
  right: 0;
  bottom: 0;
}

.routine-box-1,
.routine-box-2 {
  position: absolute;
  z-index: 10;
  background-color: var(--container-color);
  padding: .75rem .5rem;
  border-radius: .75rem;
  width: max-content;
  display: flex;
  align-items: center;
  column-gap: .5rem;
  transition: background .4s;
  /* for dark mode animation*/
}

.routine-icon,
.routine-title {
  background: var(--gradient-color);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.routine-icon {
  font-size: 1.5rem;
}

.routine-title {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

.routine-box-1 {
  top: 1.5rem;
  right: 0;
}

.routine-box-2 {
  left: 0;
  bottom: 1.5rem;
}






/*=============== FOLLOW ===============*/
.follow-title div {
  background: var(--gradient-color);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.follow-button {
  flex-direction: column;
  row-gap: .5rem;
  border-radius: 50%;
  width: 88px;
  height: 88px;
  margin-bottom: 2rem;
}

.follow-content-1,
.follow-content-2 {
  display: grid;
  justify-self: center;
}

.follow-content-1 img,
.follow-content-2 img {
  border-radius: 12.5rem;
  border: 5px solid var(--first-color-light);
  transition: border .4s;
  /* for dark mode animation*/
}

.follow-content-1 {
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
  justify-items: center;
}

.follow-data {
  text-align: center;
  grid-column: 1 / 3;
}

.follow-img-1,
.follow-img-2 {
  width: 140px;
}

.follow-img-2 {
  margin-top: 2.5rem;
}

.follow-content-2 {
  row-gap: 2rem;
}

.follow-img-3,
.follow-img-4 {
  width: 230px;
}

.follow-img-3 {
  transform: translateX(-2.5rem) rotate(15deg);
}

.follow-img-4 {
  transform: translateX(2.5rem) rotate(-15deg);
}







/*=============== JOIN ===============*/
.join-container {
  padding-bottom: 2rem;
}

.join-content {
  display: grid;
  row-gap: 1.5rem;
  background: var(--gradient-color);
  padding: 3rem 1rem 2.5rem;
  border-radius: 2rem;
  text-align: center;
}

.join-title,
.join-description {
  color: var(--white-color);
}

.join-title {
  font-size: var(--big-font-size);
  font-family: var(--second-font);
  margin-bottom: .75rem;
}

.join-input,
.join-button {
  width: 100%;
  outline: none;
  border: none;
}

.join-input {
  padding: 1.5rem;
  border-radius: 3rem;
  margin-bottom: .75rem;
  color: var(--title-color);
  font-size: var(--small-font-size);
}

.join-input::placeholder {
  color: var(--text-color-light);
}

.join-button {
  justify-content: center;
  box-shadow: 0 4px 12px hsla(260, 100%, 52%, .3);
  padding-block: 1.25rem;
  cursor: pointer;
}






/*=============== FOOTER ===============*/
.footer {
  background-color: var(--first-color-dark);
  color: var(--text-color-light);
  padding-block: 3rem 2rem;
}


.footer-container,
.footer-content,
.footer-data {
  row-gap: 2.5rem;
}


.footer-content {
  border-bottom: 1px solid var(--text-color-light);
  padding-bottom: 2.5rem;
}

.footer-logo,
.footer-social-link {
  background: var(--gradient-color);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}


.footer-logo,
.footer-title {
  font-size: var(--h2-font-size);
  font-family: var(--second-font);
  margin-bottom: 1.25rem;
}


.footer-logo {
  display: inline-block;
  font-weight: var(--font-medium);
}

.footer-title {
  color: var(--white-color);
}

.footer-social,
.footer-social-link,
.footer-group {
  display: flex;
}

.footer-group {
  flex-direction: column;
  row-gap: 2.5rem;
  align-items: center;
}

.footer-social {
  column-gap: 1.25rem;
}


.footer-social-link {
  font-size: 1.5rem;
  transition: transform .4s;
}

.footer-social-link:hover {
  transform: translateY(-.25rem);
}

.footer-copy {
  font-size: var(--smaller-font-size);
}







/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(260, 16%, 75%);
}

::-webkit-scrollbar-thumb {
  border-radius: .5rem;
  background-color: hsl(260, 16%, 65%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(260, 16%, 55%);
}





/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background: var(--gradient-color);
  display: inline-flex;
  padding: 6px;
  font-size: 1.25rem;
  border-radius: 50%;
  z-index: var(--z-tooltip);
  transition: bottom .4s, transform .4s;
}

.scrollup:hover {
  transform: translateY(-.25rem);
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}






/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 345px) {
  .container {
    margin-inline: 1rem;
  }

  .home-title {
    font-size: 2rem;
  }

  .list-content {
    flex-direction: column;
    row-gap: 2rem;
  }

  .routine-images {
    width: 250px;
  }

  .follow-img-3 {
    transform: translateX(0) rotate(15deg);
  }

  .follow-img-4 {
    transform: translateX(0) rotate(-15deg);
  }
}







/* For medium devices */
@media screen and (min-width: 576px) {

  .home-container,
  .list-container,
  .health-container,
  .routine-container,
  .follow-container,
  .join-container {
    grid-template-columns: 350px;
    justify-content: center;
  }
}

@media screen and (min-width: 767px) {
  .nav {
    column-gap: 4.5rem;
  }

  .nav-toggle,
  .nav-close {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    column-gap: 4.5rem;
  }

  .nav-menu {
    margin-left: auto;
  }

  .dark-theme .nav-menu {
    background-color: transparent;
  }

  .join-container {
    grid-template-columns: 600px;
  }

  .join-content {
    padding-inline: 3rem;
  }

  .join-form {
    display: flex;
    column-gap: 1rem;
    background-color: var(--white-color);
    padding: .5rem .5rem .5rem 1.5rem;
    border-radius: 4rem;
  }

  .join-input {
    padding: 0;
    margin: 0;
  }

  .join-button {
    padding-block: 1rem;
    width: initial;
  }

  .footer-content {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }

  .footer-data {
    grid-template-columns: repeat(3, max-content);
  }
}







/* For large devices */
@media screen and (min-width: 1024px) {

  .section-title,
  .home-data,
  .health-data,
  .routine-data {
    text-align: initial;
  }

  .home-container,
  .list-container,
  .health-container,
  .routine-container {
    grid-template-columns: repeat(2, 400px);
    align-items: center;
  }

  .home-title {
    margin: 0 0 1.25rem;
  }

  .home-title-box,
  .home-box {
    justify-content: initial;
  }

  .home-title img {
    left: initial;
    right: 0;
  }

  .list-data {
    grid-template-columns: 300px max-content;
    column-gap: 2rem;
    text-align: initial;
  }

  .health-data {
    order: 1;
  }

  .follow-content-1 {
    grid-template-columns: max-content 200px max-content;
  }

  .follow-data {
    grid-column: initial;
    order: 2;
    margin-top: 3rem;
  }

  .follow-img-2 {
    order: 3;
    margin: 0;
  }

  .follow-title {
    text-align: center;
  }

  .follow-content-2 {
    grid-template-columns: repeat(2, max-content);
    column-gap: 1rem;
  }

  .follow-img-3 {
    transform: translate(0) rotate(15deg);
  }

  .follow-img-3 {
    transform: translate(0) rotate(-15deg);
  }

}


@media screen and (min-width: 1152px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 1.5rem;
  }

  .section-title {
    margin-bottom: 2.5rem;
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

  .blur-header::after {
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    /* for safari*/
  }

  .home-container {
    grid-template-columns: repeat(2, 500px);
  }

  .home-img {
    width: 500px;
  }

  .home-title {
    margin-bottom: 1.5rem;
  }

  .home-title-box {
    column-gap: 1.5rem;
  }

  .home-title div {
    border-radius: 1rem;
  }

  .home-title img {
    width: 95px;
    top: 10rem;
    right: -1.5rem;
  }

  .home-description {
    margin-bottom: 2rem;
    padding-right: 5rem;
  }

  .home-description img {
    width: 24px;
    top: -2rem;
    left: -2rem;
  }

  .home-box {
    margin-top: 3rem;
    column-gap: 4rem;
  }

  .list-container {
    grid-template-columns: 540px 520px;
    column-gap: 4rem;
    padding-top: 2rem;
  }

  .list-content {
    column-gap: 2rem;
  }

  .list-blob {
    width: 400px;
    height: 180px;
  }

  .list-blob img {
    width: 350px;
    transform: translateY(-2rem);
  }

  .list-data {
    grid-template-columns: 340px max-content;
    column-gap: 3rem;
  }

  .list-description img {
    width: 64px;
    top: -2.5rem;
    left: -1rem;
  }

  .health-container {
    grid-template-columns: 500px 580px;
    column-gap: 2rem;
  }

  .health-img {
    width: 500px;
  }

  .health-icon {
    padding: 9px;
    font-size: 2rem;
  }

  .health-title,
  .health-number {
    font-size: var(--normal-font-size);
  }

  .health-course {
    right: 2rem;
    bottom: 3rem;
  }

  .routine-container {
    grid-template-columns: 470px 580px;
    column-gap: 4rem;
  }

  .routine-images {
    width: 580px;
    height: 575px;
  }

  .routine-img-1,
  .routine-img-2 {
    width: 500px;
  }

  .routine-img-1 {
    border: 10px solid var(--body-color);
  }

  .routine-icon {
    font-size: 2rem;
  }

  .routine-title {
    font-size: var(--normal-font-size);
  }

  .routine-box-1 {
    top: 6rem;
    right: 2rem;
  }

  .routine-box-2 {
    left: 3rem;
    bottom: 3.5rem;
  }

  .follow-content-1 {
    grid-template-columns: max-content 400px max-content;
    column-gap: 2.5rem;
  }

  .follow-content-1 img,
  .follow-content-2 img {
    border: 10px solid var(--first-color-light);
  }

  .follow-img-1,
  .follow-img-2 {
    width: 280px;
  }

  .follow-img-3,
  .follow-img-4 {
    width: 500px;
  }

  .follow-data {
    margin-top: 5rem;
  }


  .join-container {
    grid-template-columns: 992px;
    padding-block: 2rem 5rem;
  }

  .join-content {
    padding: 4rem 12rem;
    row-gap: 2.5rem;
  }

  .join-title {
    margin-bottom: 1rem;
  }

  .footer {
    padding-block: 5rem 3rem;
  }

  .footer-container {
    row-gap: 3rem;
  }

  .footer-content {
    padding-bottom: 3rem;
  }

  .footer-data {
    column-gap: 4.5rem;
  }

  .footer-logo,
  .footer-title {
    margin-bottom: 2.5rem;
  }

  .footer-group {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-social {
    column-gap: 2rem;
  }

  .scrollup {
    right: 3rem;
  }
}


@media screen and (min-width: 1248px) {
  .home-container {
    grid-template-columns: 500px 600px;
    justify-content: initial;
  }

  .home-img {
    width: 660px;
  }
}







/* For 2K resolutions (2048 x 1152, 2048 x 1536) */
@media screen and (min-width: 2000px) {
  .container {
    max-width: 1250px;
  }

  .home-container,
  .list-container,
  .health-container,
  .routine-container {
    justify-content: space-between;
  }

}